home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / pc / technical documentation / develop / develop issue 20 / develop issue 20 code / scripting the finder.sea / Scripting the Finder / Finder Tricks / DialogUtilities.h / DialogUtilities.h
Encoding:
C/C++ Source or Header  |  1994-10-05  |  2.8 KB  |  77 lines  |  [TEXT/MMCC]

  1. /*================================================================================
  2.     dialogUtilities.h
  3.     
  4.     circa 1991 by Greg Anderson
  5.     greggor@apple.com
  6.     
  7.     This file contains various dialog box utility routines
  8. ================================================================================*/
  9. #ifndef __DIALOGUTILITIES__
  10. #define __DIALOGUTILITIES__
  11.  
  12. #ifndef __TYPES__
  13. #include <Types.h>
  14. #endif
  15. #ifndef __DIALOGS__
  16. #include <Dialogs.h>
  17. #endif
  18.  
  19. //
  20. // This is the structure of an item in a dialog item list.
  21. // See IM I-427 for an explanation of the complete format
  22. // of a DITL
  23. //
  24. #if defined(powerc) || defined (__powerc)
  25. #pragma options align=mac68k
  26. #endif
  27. typedef struct
  28. {
  29.     long            placeholder;
  30.     Rect            location;
  31.     unsigned char    itemType;
  32.     unsigned char    extraLength;
  33. } DITLitem;
  34. #if defined(powerc) || defined(__powerc)
  35. #pragma options align=reset
  36. #endif
  37.  
  38. extern RoutineDescriptor gCutPasteFilterRD;
  39.  
  40. //
  41. // Prototypes for dialogUtilities.c
  42. //
  43. void                SimpleBox(short id);
  44. void                MessageBox(short id, Str255 pstr);
  45. void                GiveUserAChanceToCancel( Str255 pstr );
  46. void                CenterAndShowDialog(DialogPtr dlog);
  47. short                AddNewUserItem( DialogPtr dlog );
  48. pascal void            DrawDottedLineProc(DialogPtr dlog, short item);
  49. void                SetUserItemToDottedLine( DialogPtr dlog, short whichItem );
  50. pascal void            DrawFrameRectProc(DialogPtr dlog, short item);
  51. void                SetUserItemToFrameRect( DialogPtr dlog, short whichItem );
  52. pascal void            DrawDefaultProc(DialogPtr dlog, short item);
  53. short                InstallDefaultOutline(DialogPtr dlog, short button);
  54. pascal void            DrawActiveItemProc(DialogPtr dlog, short item);
  55. short                InstallActiveItemOutline(DialogPtr dlog, short button);
  56. pascal void            DrawGreyTransformProc(DialogPtr dlog, short item);
  57. short                InstallGreyTransform(DialogPtr dlog, short button);
  58. void                MoveOutline(DialogPtr dlog, short userItem, short button);
  59. void                MoveActiveIndicator(DialogPtr dlog, short userItem, short button);
  60. void                MoveDItem( DialogPtr dlog, short itemNumber, short h, short v );
  61. void                SetItemHandle( DialogPtr dlog, short whichItem, Handle newItem );
  62. Point                GetItemPoint( DialogPtr dlog, short itemNum );
  63. Boolean                DialogItemEnabled(DialogPtr dlog, short item);
  64. void                SetDialogItemDisableBit(DialogPtr dlog, short item, Boolean enable);
  65. void                EnableButton(DialogPtr dlog, short button,Boolean enable);
  66. Boolean                EnabledTEItemsExist(DialogPtr dlog);
  67. short                FindNextEnabledTEItem(DialogPtr dlog, short item);
  68. void                TabToNextEnabledTEItem(DialogPtr dlog);
  69. void                EnableTEItem(DialogPtr dlog, short item, Boolean enable);
  70. Boolean                GetCheckboxState(DialogPtr dlog, short checkbox);
  71. void                SetCheckboxState(DialogPtr dlog, short checkbox, Boolean check);
  72. void                ToggleCheckboxState(DialogPtr dlog, short checkbox);
  73. void                FlashDlogItem( DialogPtr dlog, short itemNum );
  74. pascal Boolean        CutPasteFilter( DialogPtr dlog, EventRecord* event, short* item );
  75.  
  76. #endif
  77.